/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.pro.service;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.pro.dao.ProjectUserDao;
import com.thinkgem.jeesite.modules.pro.entity.ProjectUser;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 项目人员Service
 * @author fanqinglong
 * @version 2017-04-24
 */
@Service
@Transactional(readOnly = true)
public class ProjectUserService extends CrudService<ProjectUserDao, ProjectUser> {
	@Autowired
	private ProjectUserDao projectUserDao;
	
	public ProjectUser get(String id) {
		return super.get(id);
	}
	
	@Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,readOnly = false, rollbackFor = Exception.class)
	public void updateCode(ProjectUser projectUser){
		projectUserDao.updateCode(projectUser);
	}
	
	public ProjectUser getByParam(ProjectUser projectUser){
		return projectUserDao.getByParam(projectUser);
	}
	public List<ProjectUser> findList(ProjectUser projectUser) {
		return super.findList(projectUser);
	}
	
	public Page<ProjectUser> findPage(Page<ProjectUser> page, ProjectUser projectUser) {
		return super.findPage(page, projectUser);
	}
	
	@Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,readOnly = false, rollbackFor = Exception.class)
	public void save(ProjectUser projectUser) {
		super.save(projectUser);
	}
	
	@Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED,readOnly = false, rollbackFor = Exception.class)
	public void delete(ProjectUser projectUser) {
		super.delete(projectUser);
	}
	
}